<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>
<%@include file="../common/jscss.jsp"%>
<%@include file="../common/selfCss.jsp"%>
<script type="text/javascript" src="/thirdparty/My97DatePicker/WdatePicker.js"></script>
<script language="javascript">
<!--
	
	//批量发送站内信
	function postMessages() {
		var nicknames = $.trim($("#nicknames").val());
		var content = $.trim($("#message_content").val());
		var allPost = $("#allPost").attr("checked");
		if (allPost == "checked") {
			allPost = "all";
		}
		if (nicknames == "" && allPost != "all") {
			$.ligerDialog.warn("请填写用户昵称！");
			return;
		}
		if (content == "") {
			$.ligerDialog.warn("请输入内容！");
			return;
		}
		$.post("/misc/info/addMessage.htm", {
			nicknames : nicknames,
			content : content,
			allPost : allPost
		}, function(data) {
			if (data == "error") {
				$.ligerDialog.warn("系统有点抽经，请稍候重试！");
			} else if(data == "success"){
				$.ligerDialog.success("发送成功！");
			}else if(data == "allWrong"){
				$.ligerDialog.warn("没有匹配到用户！");
			}else {
				$.ligerDialog.warn("没有匹配到" + data + "的用户！");
			}
		});
	}
	
//-->
</script>

<table width="700" class="def_t">
	<tr>
		<td>用户：</td>
		<td><input type="text" id="nicknames" style="width: 500px;" >
			整站发布<input type="checkbox" id="allPost"></td>
	</tr>
	<tr>
		<td>内容：</td>
		<td><textarea cols="80" rows="5" id="message_content"></textarea>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center"><button onclick="postMessages()">发送</button>
		</td>
	</tr>
</table>
<%-- <%@include file="../company/companyName.jsp"%> --%>